home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Developer Helper 1: Phil & Dave's Excellent CD
/
Excellent CD HFS.raw
/
HyperCard
/
HyperCard 1.2.2 International
/
HyperCard Danish (DK-1.2.2)
/
Flere stakke
/
Salgsrapport
/
card_3600.txt
< prev
next >
Wrap
Text File
|
1988-12-19
|
3KB
|
107 lines
-- card: 3600 from stack: in
-- bmap block id: 4134
-- flags: 0000
-- background id: 2620
-- name:
-- part 1 (button)
-- low flags: 00
-- high flags: A002
-- rect: left=433 top=276 right=301 bottom=509
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Opdater
----- HyperTalk script -----
on mouseUp
put the userLevel into saveLevel
if the userLevel < 3 then set userLevel to 3 -- "Painting"
if the userLevel < 3 then exit mouseUp
put frameBottom()-frameHeight()+10 into pieTop
put frameLeft()+5 into pieLeft
put frameHeight()-20 into pieDiameter
set cursor to 4 -- watchCursor
Set lockScreen to true
clearScreen
reset paint
choose oval tool
set lineSize to 2
set dragSpeed to 0
drag from pieLeft,pieTop to pieLeft+pieDiameter, pieTop+pieDiameter
set centered to false
put the number of lines in field "Data" into dataCount
put zero into total
repeat with i = 1 to dataCount
add line i of field "Data" to total
end repeat
put "Total er" && total into background field "Total"
put pieDiameter div 2 into pieRadius
put pieLeft+pieRadius into pieCenterX
put pieTop+pieRadius into pieCenterY
choose line tool
put zero into angle
put zero into change
repeat with i = 1 to dataCount+1
put pieCenterX + round(pieRadius * sin(angle)) into x
put pieCenterY - round(pieRadius * cos(angle)) into y
choose line tool
drag from pieCenterX,pieCenterY to x,y
if change > .02 then
set pattern to getPattern(i)
choose bucket tool
click at halfX, halfY
end if
get line i of field "data"
put pi * it / total into change
add change to angle
put pieCenterX + round((pieRadius-3) * sin(angle)) into halfX
put pieCenterY - round((pieRadius-3) * cos(angle)) into halfY
add change to angle
end repeat
reset paint
choose browse tool
set userLevel to saveLevel
Set lockScreen to false
end mouseUp
function getPattern selector
return item (selector mod 12)+1 of "2,13,11,3,14,6,21,17,31,18,4,32"
end getPattern
-- part contents for background part 5
----- text -----
50
60
13
26
45
78
-- part contents for background part 9
----- text -----
Total er 272
-- part contents for background part 11
----- text -----
Indtægter pr. varegruppe
-- part contents for background part 13
----- text -----
3 af 3
-- part contents for background part 12
----- text -----
1988 Rapport